package GoFPatterns.kt.test.counter.simple.factory;

import GoFPatterns.kt.test.counter.simple.dao.Counter;
import GoFPatterns.kt.test.counter.simple.dao.impl.Add;
import GoFPatterns.kt.test.counter.simple.dao.impl.Division;
import GoFPatterns.kt.test.counter.simple.dao.impl.MUL;
import GoFPatterns.kt.test.counter.simple.dao.impl.Minus;

public class CounterFactory {
    public Counter counting(String opr){
        switch (opr){
            case "+":
                return new Add();
            case "-":
                return new Minus();
            case "*":
                return new MUL();
            case "/":
                return new Division();
            default:
                return null;
        }
    }
}
